#include <cstdlib>
#include <iostream>
#include <string>
#include <sstream>

#include "parser.h"
#include "solver.h"

int main( int argc, char *argv[] )
{
	if ( argc != 3 )
	{
		std::cout << "Usage: StochasticSAT <input file> <output file>" << std::endl;
		return EXIT_FAILURE;
	}
/*
	std::string strSeed( argv[1] );

	std::istringstream iss1 ( strSeed );

	unsigned long long s = 0;
	if ( !(iss1 >> s) )
	{
		std::cout << "Usage: Invalid value of seed.\n" << std::endl;
		return EXIT_FAILURE;
	}
*/
	if ( parse_file( argv[1] ) == false )
	{
		return EXIT_FAILURE;
	}

	solver();

	if ( write_file( argv[2] ) == false )
	{
		return EXIT_FAILURE;
	}

	//system("pause");

	return EXIT_SUCCESS;
}
